<script type="text/javascript">
    function setData(isi,elm, isilbl, elmLbl, myDialog){
        $(myDialog).dialog("close");
        document.getElementById(elm).value = isi;
        document.getElementById(elmLbl).value = isilbl;
    }
</script>

<?php Yii::import('application.extensions.CJuiDateTimePicker.CJuiDateTimePicker') ?> 
<?php
/* @var $this SysusrsecurityController */
/* @var $model Sysusrsecurity */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'sysusrsecurity-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

<table>
    
    <tr>
	<div class="row">
		<td><?php echo $form->labelEx($model,'CredentialName'); ?></td>
		<td>: <?php echo CHtml::activeTextField($model,'CredentialName',array('id' => 'txt_CredentialName','size'=>50,'maxlength'=>50)); ?></td>
		<td><?php echo $form->error($model,'CredentialName'); ?>
</td>
	</div>
    </tr>
    <tr>
	<div class="row">
		<td><?php echo $form->labelEx($model,'Name'); ?></td>
		<td>: <?php echo CHtml::activeTextField($model,'Name',array('id' => 'txt_Name','size'=>60,'maxlength'=>100)); ?></td>
		<td><?php echo $form->error($model,'Name'); ?>
</td>
	</div>
    </tr>
    <tr>
	<div class="row">
		<td><?php echo $form->labelEx($model,'Password'); ?></td>
		<td>: <?php echo CHtml::activePasswordField($model,'Password',array('id' => 'txt_Password','size'=>60,'maxlength'=>255)); ?></td>
		<td><?php echo $form->error($model,'Password'); ?>
</td>
	</div>
    </tr>
    <tr>
	<div class="row">
		<td><?php echo $form->labelEx($model,'MenuGroupID'); ?></td>
		<td>: <?php echo CHtml::activeNumberField($model,'MenuGroupID',array('id' => 'txt_MenuGroupID', 'size'=>11)); ?> 
                    <?php echo CHtml::button('...', array('onclick'=>'$("#myDialog_MenuGroupID").dialog("open"); return false;',)); ?> 
                    <input type="text" id="lb_MenuGroupID" style="border: 0" readonly="">
                                        
                    <?php $this->beginWidget('zii.widgets.jui.CJuiDialog', array(
                            'id' => 'myDialog_MenuGroupID',
                            'options' => array('title' => 'Sysusrsecurity-MenuGroupID','width' => 600,'height' => 500,'autoOpen' => false,),
                            ));
                            $dialMenuGroupID = new myDialog();
                            $sourceMenuGroupID = $dialMenuGroupID->renderDialog("sysappmenugroup", "MenuGroupID", "txt_MenuGroupID", "lb_MenuGroupID", "MenuGroupName", "#myDialog_MenuGroupID");
                            eval($sourceMenuGroupID);
                        ?>
                    <?php $this->endWidget('zii.widgets.jui.CJuiDialog'); ?> 
                </td>
		<td><?php echo $form->error($model,'MenuGroupID'); ?>
</td>
	</div>
    </tr>
    <tr>
	<div class="row">
		<td><?php echo $form->labelEx($model,'LevelID'); ?></td>
		<td>: <?php echo CHtml::activeNumberField($model,'LevelID',array('id' => 'txt_LevelID', 'size'=>11)); ?> 
                    <?php echo CHtml::button('...', array('onclick'=>'$("#myDialog_LevelID").dialog("open"); return false;',)); ?> 
                    <input type="text" id="lb_LevelID" style="border: 0" readonly="">
                                        
                    <?php $this->beginWidget('zii.widgets.jui.CJuiDialog', array(
                            'id' => 'myDialog_LevelID',
                            'options' => array('title' => 'Sysusrsecurity-LevelID','width' => 600,'height' => 500,'autoOpen' => false,),
                            ));
                            $dialLevelID = new myDialog();
                            $sourceLevelID = $dialLevelID->renderDialog("sysusrlevel", "LevelID", "txt_LevelID", "lb_LevelID", "LevelName", "#myDialog_LevelID");
                            eval($sourceLevelID);
                        ?>
                    <?php $this->endWidget('zii.widgets.jui.CJuiDialog'); ?> 
                </td>
		<td><?php echo $form->error($model,'LevelID'); ?>
</td>
	</div>
    </tr>
    <tr>
	<div class="row">
		<td><?php echo $form->labelEx($model,'ExpiredDate'); ?></td>
		<td>: <?php echo "";$this->widget('CJuiDateTimePicker',array( 
                            'model'=>$model, //Model object 
                            'attribute'=>'ExpiredDate', //attribute name 
                            'mode'=>'date', //use "time","date" or "datetime" (default) 
                            'options' => array( 
                                'showAnim' => 'fold', 
                                'dateFormat' => 'yy-mm-dd', // save to db format 
                            ), // jquery plugin options 
                            'language' => 'id')); ?></td>
		<td><?php echo $form->error($model,'ExpiredDate'); ?>
</td>
	</div>
    </tr>
    <tr>
	<div class="row">
		<td><?php echo $form->labelEx($model,'LastLoginOn'); ?></td>
		<td>: <?php echo "";$this->widget('CJuiDateTimePicker',array( 
                            'model'=>$model, //Model object 
                            'attribute'=>'LastLoginOn', //attribute name 
                            'mode'=>'datetime', //use "time","date" or "datetime" (default) 
                            'options' => array( 
                                'showAnim' => 'fold', 
                                'dateFormat' => 'yy-mm-dd', // save to db format 
                                'timeFormat' => 'hh:mm:ss', // save to db format 
                            ), // jquery plugin options 
                            'language' => 'id')); ?></td>
		<td><?php echo $form->error($model,'LastLoginOn'); ?>
</td>
	</div>
    </tr>
    <tr>
	<div class="row">
		<td><?php echo $form->labelEx($model,'LastLoginOnIP'); ?></td>
		<td>: <?php echo CHtml::activeTextField($model,'LastLoginOnIP',array('id' => 'txt_LastLoginOnIP','size'=>50,'maxlength'=>50)); ?></td>
		<td><?php echo $form->error($model,'LastLoginOnIP'); ?>
</td>
	</div>
    </tr>
    <tr>
	<div class="row">
		<td><?php echo $form->labelEx($model,'LastLoginOnPC'); ?></td>
		<td>: <?php echo CHtml::activeTextField($model,'LastLoginOnPC',array('id' => 'txt_LastLoginOnPC','size'=>50,'maxlength'=>50)); ?></td>
		<td><?php echo $form->error($model,'LastLoginOnPC'); ?>
</td>
	</div>
    </tr>
    <tr>
	<div class="row">
		<td><?php echo $form->labelEx($model,'isLocked'); ?></td>
		<td>: <?php echo CHtml::activeCheckBox($model,'isLocked', array('id' => 'cb_isLocked')); ?></td>
		<td><?php echo $form->error($model,'isLocked'); ?>
</td>
	</div>
    </tr>
<tr>
    <td colspan="3">
	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>
    </td>
</tr>
</table>
</div>
<?php $this->endWidget(); ?>
<!-- form -->